Entity Vehicle
Vehicle is the Entity definition for a vehicle.
Subclass of Entity.
Functions
GetAttribute (attrib) | GetAttribute returns the value of the given attribute for the vehicle. |
GetHP () | GetHP returns the current HP of the vehicle. |
GetDriver () | GetDriver returns the current driver of the vehicle. |
GetGunner () | GetGunner returns the current gunner of the vehicle. |
GetController () | GetController returns the @{VehicleController) object for the vehicle. |
GetPassenger (num) | GetPassenger returns the given numbered passenger of the vehicle. |
GetRepairObject () | GetRepairObject returns the repair object for this vehicle. |
GetVehicleWeapon () | GetVehicleWeapon returns the weapon on this vehicle. |
GetDriverLeftHandItem () | GetDriverLeftHandItem returns the saved left hand item for the driver. |
GetGunnerLeftHandItem () | GetGunnerLeftHandItem returns the saved left hand item for the gunner. |
GetInventory () | GetInventory returns the inventory of the vehicle. |
GetNumPassengers () | GetNumPassengers returns the number of non-driving and non-gunning passengers in the vehicle. |
GetTotalOccupants () | GetTotalOccupants returns the total number of occupants of the vehicle (driver, gunner, and passengers). |
GetMaxPassengers () | GetMaxPassengers returns the maximum number of non-driving and non-gunning passengers in the vehicle. |
GetMaxTotalOccupants () | GetMaxTotalOccupants returns the maximum number of total occupants of the vehicle (driver, gunner, and passengers). |
GetTurnRate () | GetTurnRate returns the turn rate of the vehicle. |
GetCriticalChance () | GetCriticalChance returns the critical hit chance if the vehicle rams a target. |
GetDamageMultiplier () | GetDamageMultiplier returns the damage multiplier if the vehicle rams a target. |
GetAcceleration () | GetAcceleration returns the acceleration of the vehicle. |
GetMaxSlowSpeed () | GetMaxSlowSpeed returns the maximum "slow" speed of the vehicle. |
GetMaxHighSpeed () | GetMaxHighSpeed returns the maximum speed of the vehicle. |
GetEndTurnTime () | GetEndTurnTime returns the animation clock time of the end of the vehicle's change in direction. |
NeedsRepairObject () | NeedsRepairObject returns true if the vehicle needs repair. |
HasWeapon () | HasWeapon returns true if the vehicle has a weapon. |
IsRunSpeed () | IsRunSpeed returns true if the vehicle is at high speed. |
IsReverse () | IsReverse returns true if the vehicle is in reverse. |
IsDestinationReached () | IsDestinationReached returns true if the vehicle is at its destination. |
IsTurnReached () | IsTurnReached returns true if the vehicle has finished changing direction. |
IsHavingTurn () | IsHavingTurn returns true if the vehicle is turning. |
GetCurrentAction () | GetCurrentAction returns the current animation action for the vehicle. |
GetButtonSprite () | GetButtonSprite returns the sprite to use for the vehicle controller. |
GetButtonSprite () | GetExitPoint returns the exit point of actors in the vehicle. |
GetDestination () | GetDestination returns the destination of the vehicle. |
GetVelocity () | GetVelocity returns the directional velocity of the vehicle. |
GetDimensions () | GetDimensions returns the linear dimensions of the vehicle. |
Functions
- GetAttribute (attrib)
-
GetAttribute returns the value of the given attribute for the vehicle.
Parameters:
- attrib The attribute to check, as a string. Should match attribute strings from the editor.
Returns:
-
An integer indicating the vehicle's attribute value.
- GetHP ()
-
GetHP returns the current HP of the vehicle.
Returns:
-
An integer indicating the current HP.
- GetDriver ()
-
GetDriver returns the current driver of the vehicle.
Returns:
-
An Actor object indicating the current driver, or nil if no driver.
- GetGunner ()
-
GetGunner returns the current gunner of the vehicle.
Returns:
-
An Actor object indicating the current gunner, or nil if no gunner.
- GetController ()
-
GetController returns the @{VehicleController) object for the vehicle.
Returns:
-
A VehicleController object for the vehicle.
- GetPassenger (num)
-
GetPassenger returns the given numbered passenger of the vehicle.
Parameters:
- num Which numbered passenger to retrieve.
Returns:
-
An Actor object for the passenger if there is one, else nil.
- GetRepairObject ()
-
GetRepairObject returns the repair object for this vehicle.
Returns:
-
A Collectable object for the repair object.
- GetVehicleWeapon ()
-
GetVehicleWeapon returns the weapon on this vehicle.
Returns:
-
A VehicleWeapon object if the vehicle has a weapon, else nil.
- GetDriverLeftHandItem ()
-
GetDriverLeftHandItem returns the saved left hand item for the driver.
Returns:
-
An Entity object for the driver's left hand object.
- GetGunnerLeftHandItem ()
-
GetGunnerLeftHandItem returns the saved left hand item for the gunner.
Returns:
-
An Entity object for the gunner's left hand object.
- GetInventory ()
-
GetInventory returns the inventory of the vehicle.
Returns:
-
An array of Collectable objects indicating the vehicle inventory.
- GetNumPassengers ()
-
GetNumPassengers returns the number of non-driving and non-gunning passengers in the vehicle.
Returns:
-
An integer indicating the number of passengers.
- GetTotalOccupants ()
-
GetTotalOccupants returns the total number of occupants of the vehicle (driver, gunner, and passengers).
Returns:
-
An integer indicating the number of occupants.
- GetMaxPassengers ()
-
GetMaxPassengers returns the maximum number of non-driving and non-gunning passengers in the vehicle.
Returns:
-
An integer indicating the maximum number of passengers.
- GetMaxTotalOccupants ()
-
GetMaxTotalOccupants returns the maximum number of total occupants of the vehicle (driver, gunner, and passengers).
Returns:
-
An integer indicating the maximum number of occupants.
- GetTurnRate ()
-
GetTurnRate returns the turn rate of the vehicle.
Returns:
-
An integer indicating the turn rate.
- GetCriticalChance ()
-
GetCriticalChance returns the critical hit chance if the vehicle rams a target.
Returns:
-
An integer indicating the critical hit chance on ramming.
- GetDamageMultiplier ()
-
GetDamageMultiplier returns the damage multiplier if the vehicle rams a target.
Returns:
-
A numeric value indicating the damage multiplier on ramming.
- GetAcceleration ()
-
GetAcceleration returns the acceleration of the vehicle.
Returns:
-
A numeric value indicating the acceleration.
- GetMaxSlowSpeed ()
-
GetMaxSlowSpeed returns the maximum "slow" speed of the vehicle.
Returns:
-
A numeric value indicating the slow speed.
- GetMaxHighSpeed ()
-
GetMaxHighSpeed returns the maximum speed of the vehicle.
Returns:
-
A numeric value indicating the maximum speed.
- GetEndTurnTime ()
-
GetEndTurnTime returns the animation clock time of the end of the vehicle's change in direction.
Returns:
-
A numeric value indicating the time of finishing a requested change of direction.
- NeedsRepairObject ()
-
NeedsRepairObject returns true if the vehicle needs repair.
Returns:
-
A boolean value indicating repair is needed.
- HasWeapon ()
-
HasWeapon returns true if the vehicle has a weapon.
Returns:
-
A boolean value indicating the vehicle has a weapon.
- IsRunSpeed ()
-
IsRunSpeed returns true if the vehicle is at high speed.
Returns:
-
A boolean value indicating the vehicle is at high speed.
- IsReverse ()
-
IsReverse returns true if the vehicle is in reverse.
Returns:
-
A boolean value indicating the vehicle is in reverse.
- IsDestinationReached ()
-
IsDestinationReached returns true if the vehicle is at its destination.
Returns:
-
A boolean value indicating the vehicle is at its destination.
- IsTurnReached ()
-
IsTurnReached returns true if the vehicle has finished changing direction.
Returns:
-
A boolean value indicating the vehicle has finished changing direction.
- IsHavingTurn ()
-
IsHavingTurn returns true if the vehicle is turning.
Returns:
-
A boolean value indicating the vehicle is turning.
- GetCurrentAction ()
-
GetCurrentAction returns the current animation action for the vehicle.
Returns:
-
A string indicating the current action animation.
- GetButtonSprite ()
-
GetButtonSprite returns the sprite to use for the vehicle controller.
Returns:
-
A string indicating the vehicle control sprite.
- GetButtonSprite ()
-
GetExitPoint returns the exit point of actors in the vehicle.
Returns:
-
A table containing numeric values "x", "y", and "z" indicating the exit point.
- GetDestination ()
-
GetDestination returns the destination of the vehicle.
Returns:
-
A table containing numeric values "x", "y", and "z" indicating the destination.
- GetVelocity ()
-
GetVelocity returns the directional velocity of the vehicle.
Returns:
-
A table containing numeric values "x", "y", and "z" indicating the velocity.
- GetDimensions ()
-
GetDimensions returns the linear dimensions of the vehicle.
Returns:
-
A table containing numeric values "x", "y", and "z" indicating the vehicle dimensions.